package com.ytf.test.fourth;

import java.util.Random;

/**
 * @author: YTF
 * @date: 2024/9/14 17:19
 * @version: 1.0
 * @description:
 */
public class ForEachFloat {
    public static void main(String[] args) {
        float[] fs=new float[10];
        Random random = new Random(47);
        for (int i = 0; i < 10; i++) {
            float v = random.nextFloat();
            fs[i]=v;
        }
        for (float f:fs) {
            System.out.println("f: "+f);
        }
        /**
         * Output:
         * f: 0.72711575
         * f: 0.39982635
         * f: 0.5309454
         * f: 0.0534122
         * f: 0.16020656
         * f: 0.57799757
         * f: 0.18847865
         * f: 0.4170137
         * f: 0.51660204
         * f: 0.73734957
         */
    }
}
